﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace Tomato.Cryptography
{
    class XorCryptoServiceProvider : SymmetricAlgorithm
    {
        public XorCryptoServiceProvider()
        {
            BlockSizeValue = 64;
            KeySizeValue = 64;
        }

        public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)
        {
            return new XorDecryptor() { Key = rgbKey };
        }

        public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
        {
            return new XorEncryptor() { Key = rgbKey };
        }

        public override void GenerateIV()
        {
            throw new NotImplementedException();
        }

        public override void GenerateKey()
        {
            throw new NotImplementedException();
        }
    }
}
